package cn.edu.nwsuaf.teachercenter.pojo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * StudentCommonScoreId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class StudentCommonScoreId implements java.io.Serializable {

	// Fields

	private String studentNo;
	private String courceNo;

	// Constructors

	/** default constructor */
	public StudentCommonScoreId() {
	}

	/** full constructor */
	public StudentCommonScoreId(String studentNo, String courceNo) {
		this.studentNo = studentNo;
		this.courceNo = courceNo;
	}

	// Property accessors

	@Column(name = "student_no", nullable = false, length = 50)
	public String getStudentNo() {
		return this.studentNo;
	}

	public void setStudentNo(String studentNo) {
		this.studentNo = studentNo;
	}

	@Column(name = "cource_no", nullable = false, length = 50)
	public String getCourceNo() {
		return this.courceNo;
	}

	public void setCourceNo(String courceNo) {
		this.courceNo = courceNo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof StudentCommonScoreId))
			return false;
		StudentCommonScoreId castOther = (StudentCommonScoreId) other;

		return ((this.getStudentNo() == castOther.getStudentNo()) || (this
				.getStudentNo() != null && castOther.getStudentNo() != null && this
				.getStudentNo().equals(castOther.getStudentNo())))
				&& ((this.getCourceNo() == castOther.getCourceNo()) || (this
						.getCourceNo() != null
						&& castOther.getCourceNo() != null && this
						.getCourceNo().equals(castOther.getCourceNo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getStudentNo() == null ? 0 : this.getStudentNo().hashCode());
		result = 37 * result
				+ (getCourceNo() == null ? 0 : this.getCourceNo().hashCode());
		return result;
	}

}